package yicr;

/**
 * <h3>Title:</h3>
 * <p>
 *
 * <h3>Description</h3>
 * <p> 包含距离最近的3个基站cell,基站距离
 *
 * <h3>Author</h3>
 * <p>
 * Lin Shao
 * <h3>Update Time</h3>
 * <p>2021-10-24 23:31
 *
 * @author Lin Shao
 * @version 1.0
 */
public class RelationWithNeighbour implements Comparable<RelationWithNeighbour> {

   private Cell mainCell;
   private Cell neighbourCell;
   private Double distance;
   private Double coverRadius;


    public RelationWithNeighbour(Cell mainCell, Cell neighbourCell, Double distance) {
        this.mainCell = mainCell;
        this.neighbourCell = neighbourCell;
        this.distance = distance;
    }

    public Cell getMainCell() {
        return mainCell;
    }

    public void setMainCell(Cell mainCell) {
        this.mainCell = mainCell;
    }

    public Cell getNeighbourCell() {
        return neighbourCell;
    }

    public void setNeighbourCell(Cell neighbourCell) {
        this.neighbourCell = neighbourCell;
    }

    public Double getDistance() {
        return distance;
    }

    public void setDistance(Double distance) {
        this.distance = distance;
    }

    public Double getCoverRadius() {
        return coverRadius;
    }

    public void setCoverRadius(Double coverRadius) {
        this.coverRadius = coverRadius;
    }

    @Override
    public int compareTo(RelationWithNeighbour o) {
        return (int)(distance-o.getDistance());
    }

    @Override
    public String toString() {
        return "RelationWithNeighbour{" +
                "mainCell=" + mainCell +
                ", neighbourCell=" + neighbourCell +
                ", distance=" + distance +
                ", coverRadius=" + coverRadius +
                '}';
    }
}
